package com.igeek.base.ch0715.Demo2;

import java.time.LocalDate;
import java.util.Objects;

/**
 * @Description TODO
 * @Author chenmin
 * @Date 2024/7/15 20:36
 */
public class Student {
    private String name;
    private Integer id;
    private LocalDate birthday;


    public Student() {
    }

    public Student(String name, Integer id, LocalDate birthday) {
        this.name = name;
        this.id = id;
        this.birthday = birthday;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(name, student.name) && Objects.equals(id, student.id) && Objects.equals(birthday, student.birthday);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, id, birthday);
    }
}
